package controllers;

import dto.retjson.RetDataDto;
import play.libs.Json;
import play.mvc.Controller;
import play.mvc.Result;
import services.security.*;

public class AuthController extends Controller {

	/**
     * Get reqId
     */
    public static Result generateReqId(){
    	Long reqId = AniSecurityService.generateReqId();
    	return ok(Json.toJson(new RetDataDto(true, "REQ_ID", reqId)));
    }
    
    /**
     * Get sessionId
     */
    public static Result generateSessionId(){
    	Long sessionId = AniSecurityService.generateUniqueId();
    	return ok(Json.toJson(new RetDataDto(true, "SESSION_ID", sessionId)));
    }
}
